package org.xenon.vote.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 读取配置文件获得默认配置, 并且对外提供配置对象
 */
@Component
@ConfigurationProperties(prefix = "cos.mail")
public class MailConfig {
    private String qq_sender;
    private String qq_passwd;
    private String qq_host;

    public String getQq_sender() {
        return qq_sender;
    }

    public void setQq_sender(String qq_sender) {
        this.qq_sender = qq_sender;
    }

    public String getQq_passwd() {
        return qq_passwd;
    }

    public void setQq_passwd(String qq_passwd) {
        this.qq_passwd = qq_passwd;
    }

    public String getQq_host() {
        return qq_host;
    }

    public void setQq_host(String qq_host) {
        this.qq_host = qq_host;
    }
}

/*
 *
 * 被遗弃 其实这个类现在没什么用, 以后可能会有用
@Deprecated
class MailSetting{
    @NotBlank
    @NotNull
    private final String sender;

    @NotBlank
    @NotNull
    private final String passwd;

    @NotBlank
    @NotNull
    private final String host;

    public MailSetting(@NotBlank @NotNull String sender,
                       @NotBlank @NotNull String passwd,
                       @NotBlank @NotNull String host) {
        this.sender = sender;
        this.passwd = passwd;
        this.host = host;
    }

    public String getSender() {
        return sender;
    }

    public String getPasswd() {
        return passwd;
    }

    public String getHost() {
        return host;
    }
}
*/
